﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Entity : MonoBehaviour {
    public int EntityType { get; set; }
    public string EntityID { get; set; }

    public int RelationType { get; set; }

    public int Hp { get; set; }
    public int HpMax { get; set; }

    public int Score { get; set; }

    public BarBase headBar;

    public void HpChange(int damage)
    {
        Hp -= damage;
        if (headBar != null)
        {
            headBar.UpdateHp();
            headBar.ShowDamage(Hp + damage, damage, HpMax);
        }
    }
}
